#include<stdio.h>
int main()
{
	int a;
	scanf("%d",&a);
	if(a>=90){
		printf("%d belongs to A.\n",a);
	}
	else if(a>=60&&a<89){
		printf("%d belongs to B.\n",a);
	}
	else{
		printf("%d belongs to C.\n",a);
	}
	return 0;
}
